package com.king.factory.method;

import com.king.factory.simple.CarFactory;

public class Consumer {
    public static void main(String[] args) {
        //工厂方法模式
        Car car = new WuLingFactory().getCar();
        Car car1 = new BenchiFactory().getCar();
        car.name();car1.name();

        //新增一个大众车
        new DaZhongFactory().getCar().name();
    }
}
